package com.hanlin.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hanlin.backend.common.annotation.ModelSubmit;
import com.hanlin.backend.common.entity.HlAuthority;
import com.hanlin.backend.dto.AuthorityDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限表 Mapper 接口
 * </p>
 *
 * @author hl.yuan
 * @since 2021-01-06
 */
public interface HlAuthorityMapper extends BaseMapper<HlAuthority> {
    /**
     * 根据用户权限获取
     *
     * @param userIds
     * @param roleIds
     * @return
     */
    @ModelSubmit
    List<AuthorityDto> getAuthorityByIds(@Param("userIds") List<Integer> userIds, @Param("roleIds") List<Integer> roleIds);

    /**
     * 获取全部的权限
     * @return
     */
    List<AuthorityDto> getAuthorityAll();

}
